package io.renren.modules.erp.service;

import com.baomidou.mybatisplus.extension.service.IService;
import io.renren.common.utils.PageUtils;
import io.renren.modules.erp.entity.AccountHead;
import io.renren.modules.erp.entity.AccountHeadVo4ListEx;

import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.util.List;

public interface AccountHeadService extends IService<AccountHead> {

    AccountHead getAccountHead(long id) throws Exception ;

    List<AccountHead> getAccountHeadListByIds(String ids)throws Exception ;

    List<AccountHead> getAccountHead() throws Exception;

    PageUtils select(String type, String roleType, String billNo, String beginTime, String endTime, int currPage, int  pageSize, Long userId) throws Exception;

    PageUtils getReceiptList(String billNo,String type,String status,String organName, String roleType, String beginTime, String endTime, int currPage, int  pageSize, Long userId,String totalPriceMin,String totalPriceMax) throws Exception;

    PageUtils getPaymentList(String billNo,String type,String status,String organName, String roleType, String beginTime, String endTime, int currPage, int  pageSize, Long userId,String totalPriceMin,String totalPriceMax,String paymentType) throws Exception;



    PageUtils getVerificationList(String billNo,String type,String status,String organName, String roleType, String beginTime, String endTime, int currPage, int  pageSize, Long userId,String totalPriceMin,String totalPriceMax,String serviceType) throws Exception;


    Long countAccountHead(String type, String roleType, String billNo, String beginTime, String endTime,Long userId) throws Exception;

    int insertAccountHead(String beanJson, HttpServletRequest request,Long userId) throws Exception;

    int updateAccountHead(String beanJson, Long id, HttpServletRequest request)throws Exception ;

    int deleteAccountHead(Long id, HttpServletRequest request)throws Exception;

    int batchDeleteAccountHead(String ids, HttpServletRequest request)throws Exception ;

    int checkIsNameExist(Long id, String name)throws Exception ;
    Long getMaxId()throws Exception;
    BigDecimal findAllMoney(Integer supplierId, String type, String mode, String endTime) ;

    BigDecimal allMoney(String getS, String type, String mode, String endTime) ;

    BigDecimal findTotalPay(Integer supplierId, String endTime, String supType) ;

    List<AccountHeadVo4ListEx> getDetailByNumber(String billNo)throws Exception ;
    int batchDeleteAccountHeadByIds(String ids,Long userId)throws Exception;

    int batchDeleteAccountHeadByIdsNormal(String ids,Long userId) throws Exception ;

    int batchSetStatus(String status, String accountHeadIDs)throws Exception ;


    void addReceiptAndDetail(String beanJson, String rows, Long tenantId,
                              HttpServletRequest request,Long userId,String numbers) throws Exception ;

    void addPaymentAndDetail(String beanJson, String rows, Long tenantId,
                             HttpServletRequest request,Long userId,String numbers) throws Exception ;


    void addVerification(String beanJson,  Long tenantId,
                             HttpServletRequest request,Long userId,String numbers) throws Exception ;

    void updateReceiptAndDetail(Long id, String beanJson, String rows,
                                Long tenantId,HttpServletRequest request,Long userId,String numbers)throws Exception ;


    PageUtils getReceivableList(String type, String organName, String roleType, String beginTime, String endTime, int currPage, int pageSize, String userName, String receivablesBillno, Long userId) throws Exception;

    PageUtils getAccountableList(String type, String organName, String roleType, String beginTime, String endTime, int currPage, int pageSize, String userName, String accountpayBillno, Long userId) throws Exception;


}
